The present invention relates generally to handheld computers and smart cards. In particular the invention relates to low cost, low-power computerized cards with writeable memory.
A computerized smart card is typically a cuboid enclosure with dimensions on the order of 100 mmxc3x9740 mmxc3x975 mm of a resilient plastic material that includes a semiconductor chip capable of holding data and typically capable of supporting multiple user applications.
Physically, a smart card often resembles the commonplace credit card but having one or more semiconductor devices attached to a module embedded in the card, providing communication with the outside world typically, though not necessarily, via electrical contacts.
Though usage is commonplace, handheld computers and smart cards have been too expensive for ubiquitous use. A number of problems exist in reducing the cost of these to a minimum. Moreover, smart cards that implement any form of wireless (radio, optical, audio etc.) communication tend to be expensive and include some form of computerxe2x80x94typically a micro-controller. Low cost micro-controllers are well known in the art. Unlike smart cards with electrical contacts, wireless smart cards also require a self-contained energy source (typically an electro-chemical cell or battery of cells) which further limits design and drives up cost.
A bare minimum useful wireless handheld computer (or smart card) will comprise an enclosure, an electrical energy source, a programmable microprocessor or micro-controller of some form, together with memory, operator controls, a wireless means for data input and a wireless means for data output. When a bare-bones handheld computer is designed for lowest possible cost, consistent with at least a minimum of usefulness, it becomes apparent that the need for a microprocessor or micro-controller together with memory constitute a significant proportion of the total cost. Therefore it is desirable to use the cheapest possible micro-controller part (with on-board memory), consistent with energy constraints.
A minimally useful handheld computer will require three classes of memory:
1. A non-volatile, readable memory for storage of program codes and unchanging data. This memory may be, but need not be, a read-only memory (ROM).
2. A non-volatile, read/write memory for storage of data. This memory does not need to be fast, nor does it need to support many writes cycles.
3. A read/write scratch pad memory with an effectively unlimited life cycle.
Various memory technologies are available, and indeed a battery backed complementary metal oxide semiconductor (CMOS) memory might meet the requirements of all three memory classes supra. However lower cost approaches are possible and such a xe2x80x9cbattery-CMOSxe2x80x9d device would need to be continuously energized.
Generally scratch pad memory is included with all micro-controllers, so it is not a crucial design constraint in the present context.
Certain very low cost micro-controllers with on-board non-volatile memory at the present time provide a FLASH memory with a bulk erase feature. FLASH memories with bulk erase are well known in the art. For lowest possible cost it is desirable to use a single FLASH memory for both program codes and data. The cheapest micro-controllers with on-board FLASH memory are not primarily intended for use in such a mode. Rather the intention is that the FLASH memory shall be programmed using an external computer or programming machine of some kind and the memory shall be bulk erased with the same or a similar device. Such FLASH memory is intended to be used in a manner whereby it is erased all at once (in bulk) and then re-programmed in entirety.
Thus, a need exists for an extremely low cost smart card. Also, a need exists for a method of implementing a computer system with persistent data storage implemented as a single FLASH memory.
Accordingly a method is disclosed for implementing a computer system with persistent data storage using a single non-volatile FLASH memory. A SwapCard (a trademark of SWAPCARD Inc.) based upon an ATMEL ((trademark)) AT89LV51 embedded micro-controller is disclosed. The AT89LV51 is a complementary metal-oxide semiconductor (CMOS) device, CMOS devices being common in the art. This micro-controller includes many features of the xe2x80x988051xe2x80x99 like micro-controller family members of which are well known in the art. A particular version of this micro-controller includes 128 bytes of scratch pad memory and a single FLASH memory of (typically) 32 Kbits. A part of the FLASH memory is used to hold program instructions and is written using an external programming computer in the factory when the SwapCard is manufactured. A second part of the FLASH memory is used to hold data and is read from and written to under the control of the program instructions in the first part (i.e. the low address space) of the FLASH memory.
External to the micro-controller but within the Swapcard, programming circuitry is provided for programming an eight-bit byte into the second part of the FLASH memory. A significant constraint is that it is not possible for the micro-controller to fetch program instructions from the FLASH memory while a byte is being programmed. In fact, programming a byte of FLASH memory takes a much longer time (on the order of a millisecond) than the typical instruction cycle time for the micro-controller. The micro-controller must be held in a reset state during programming, causing the ordinary program execution sequence to be inhibited.
Whenever programming of a byte to FLASH memory is completed the SwapCard ((trademark)) circuitry external to the micro-controller releases the micro-controller RESET control wire and the firmware must recover its context. For cost reasons, no non-volatile memory is made available to store the context across data programming cycles. Thus, the firmware must recover its context by using a resource external to the SwapCard. One external source disclosed is a co-operating computer with which the SwapCard is in wireless communication.